#include "../../include/Shader/Shader.h"
#include <iostream>

using namespace z_shader;

TwoDShader::TwoDShader() {};
TwoDShader::~TwoDShader(){}

z_v2f::VertToFrag TwoDShader::vertexShader(const z_vertex::Vertex& vex) {
	z_v2f::VertToFrag v2f = z_v2f::VertToFrag();
	

	v2f.world_pos = matTransform * vex.pos;

	v2f.projection_pos = matProject * matView * v2f.world_pos;

	v2f.color = vex.color;
	v2f.normal = vex.normal;

	v2f.texcoord = vex.texcoord;

	//v2f.screen_pos.x = vex.pos.x;
	//v2f.screen_pos.y = vex.pos.y;

	return v2f;
}


z_vector::Vector4f TwoDShader::fragmentShader(const z_v2f::VertToFrag& v2f) {
	z_vector::Vector4f fragColor = z_vector::Vector4f(v2f.color);
	return fragColor;
}